[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Determines if this bag is disjoint from another bag. Two bags are disjoint
if no item from one set is equal to any item in the other bag.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public bool IsDisjointFrom( OrderedBag<T> otherBag ) |
Visual Basic (Declaration) |
---|
Public Function IsDisjointFrom ( _ otherBag As OrderedBag(Of T) _ ) As Boolean |
Visual C++ |
---|
public: bool IsDisjointFrom ( OrderedBag<T>^ otherBag ) |
Parameters
- otherBag
- OrderedBag<(Of <T>)>
Bag to check disjointness with.
Return Value
True if the two bags are disjoint, false otherwise.Remarks
The answer is computed in time O(N), where N is the size of the smaller set.
Exceptions
Exception | Condition |
---|---|
System..::InvalidOperationException | This bag and otherBag don't use the same method for comparing items. |
See Also
OrderedBag<(Of <T>)> Class
Wintellect.PowerCollections Namespace